package com.prestamomo.vil.ppa.pmvilapi;

import androidx.lifecycle.LifecycleOwner;

import com.alibaba.fastjson.JSONObject;
import com.prestamomo.vil.ppa.pmvilnet.PmvilHttpCall;
import com.prestamomo.vil.ppa.pmvilnet.PmvilResponseModel;
import com.prestamomo.vil.ppa.pmvilnet.PmvilRetrofitHelper;
import com.prestamomo.vil.ppa.pmvilnet.pmvillistener.PmvilCallBack;
import com.prestamomo.vil.ppa.pmvilnet.pmvilutils.PmvilHttpBodyOrStr;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import io.reactivex.Observable;

public class PmvilHttpRequest {

    public static void getCodePmvilMsg(LifecycleOwner owner, String loginName, String type, PmvilCallBack<PmvilMsgCode> callBackLis) {
        Map<String, Object> params = new HashMap<>();
        params.put("pvvokdoh", loginName);//mobile
        params.put("oxishefxu", type);//type
        Observable<PmvilResponseModel<PmvilMsgCode>> observable = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getPmvilMsgCode(PmvilHttpBodyOrStr.getPmvilRequestBy(params));
        PmvilHttpCall.doPmvilCall(owner, observable, callBackLis, null);
    }

    public static void postPmvilLogin(LifecycleOwner pmvilOwner, String pmvilPhone, String pmvilCode, String pmvilType, PmvilCallBack<PmvilLoginBean> pmvilLoginCall) {
        Map<String, Object> params = new HashMap<>();
        params.put("imabm", pmvilPhone);//phone
        params.put("msztn", pmvilCode);//code
        params.put("oxishefxu", pmvilType);//type
        Observable<PmvilResponseModel<PmvilLoginBean>> pmvilLoginOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .Pmvillogin(PmvilHttpBodyOrStr.getPmvilRequestBy(params));
        PmvilHttpCall.doPmvilCall(pmvilOwner, pmvilLoginOble, pmvilLoginCall, null);
    }

    //get pei zi
    public static void getConfigser(LifecycleOwner pmvilOwner, String pmvilType, PmvilCallBack<List<PmvilSerConfig>> pmvilLoginCall) {
        Map<String, Object> params = new HashMap<>();
        params.put("xhweoi", pmvilType);//configType
        Observable<PmvilResponseModel<List<PmvilSerConfig>>> pmvilLoginOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getConfigser(PmvilHttpBodyOrStr.getPmvilMethStr(params));
        PmvilHttpCall.doPmvilCall(pmvilOwner, pmvilLoginOble, pmvilLoginCall, null);
    }
 public static void getPmvilConfig(LifecycleOwner pmvilOwner, String pmvilType, PmvilCallBack<PmvilSerConfig> pmvilLoginCall) {
        Map<String, Object> params = new HashMap<>();
        params.put("bnlaplk", pmvilType);//configKey
        Observable<PmvilResponseModel<PmvilSerConfig>> pmvilLoginOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getPmvilConfig(PmvilHttpBodyOrStr.getPmvilMethStr(params));
        PmvilHttpCall.doPmvilCall(pmvilOwner, pmvilLoginOble, pmvilLoginCall, null);
    }

    //out login
    public static void outPmvilLogin(LifecycleOwner pmvilOwner, String pmvilVersion, PmvilCallBack<String> pmvilLoginCall) {
        Map<String, Object> params = new HashMap<>();
        params.put("qwgoqiwe", pmvilVersion);//version
        params.put("pmmvilOls", pmvilVersion);
        params.put("pmvilljioew", pmvilVersion);
        Observable<PmvilResponseModel<String>> pmvilLoginOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .outPmvilLogin(PmvilHttpBodyOrStr.getPmvilMethStr(params));
        PmvilHttpCall.doPmvilCall(pmvilOwner, pmvilLoginOble, pmvilLoginCall, null);
    }

    //save user question
    public static void postPmvilQuest(LifecycleOwner pmvilOwner, String pmvilQuestCode, String pmvilQuestStr, PmvilCallBack<Boolean> pmvilQuestCall) {
        Map<String, Object> params = new HashMap<>();
        params.put("ezjngp", pmvilQuestCode);//questionType
        params.put("wwbrmmn", pmvilQuestStr);//question
        Observable<PmvilResponseModel<Boolean>> pmvilQuestOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .postPmvilQuest(PmvilHttpBodyOrStr.getPmvilRequestBy(params));
        PmvilHttpCall.doPmvilCall(pmvilOwner, pmvilQuestOble, pmvilQuestCall, null);
    }

    //get user question
    public static void getUserPmvilQuest(LifecycleOwner pmvilOwer, PmvilCallBack<List<PmvilQuestion>> pmvilQuestListCall) {
        Observable<PmvilResponseModel<List<PmvilQuestion>>> pmvilListQuestOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getUserPmvilQuest();
        PmvilHttpCall.doPmvilCall(pmvilOwer,pmvilListQuestOble,pmvilQuestListCall,null);
    }

    //get user info
    public static void getUserPmvilData(LifecycleOwner pmvilOwer,PmvilCallBack<PmvilClient> pmvilUserDataCall){
        Observable<PmvilResponseModel<PmvilClient>> pmvilUserOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getUserPmvilData();
        PmvilHttpCall.doPmvilCall(pmvilOwer,pmvilUserOble,pmvilUserDataCall,null);
    }
    //base info comint
    public static void postUserPmvilAuth(LifecycleOwner pmvilOwer,Map<String,Object> pmvilMap,PmvilCallBack<PmvilBodys> pmvilUserAuthCall){
        Observable<PmvilResponseModel<PmvilBodys>> pmvilQuestOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .postUserPmvilAuth(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilMap));
        PmvilHttpCall.doPmvilCall(pmvilOwer, pmvilQuestOble, pmvilUserAuthCall, null);
    }

    //check v5
    public static void getCheckPmvilPage(LifecycleOwner pmvilOwer,PmvilCallBack<PmvilCheckPage> pmvilCheckPagePmvilCallBack){
        Observable<PmvilResponseModel<PmvilCheckPage>> pmvilQuestOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getCheckPmvilPage();
        PmvilHttpCall.doPmvilCall(pmvilOwer, pmvilQuestOble, pmvilCheckPagePmvilCallBack, null);
    }

    //face comint
    public static void postFacePmvilUser(LifecycleOwner pmvilOwer,String livenessPmvilImg,PmvilCallBack<Boolean> pmvilFaceCall){
        Map<String, Object> params = new HashMap<>();
        params.put("jzaqcmi", livenessPmvilImg);//livenessImg
        Observable<PmvilResponseModel<Boolean>> pmvilQuestOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .postFacePmvilUser(PmvilHttpBodyOrStr.getPmvilRequestBy(params));
        PmvilHttpCall.doPmvilCall(pmvilOwer, pmvilQuestOble, pmvilFaceCall, null);
    }

    //ocr info comint
    public static void postUserPmvilOcr(LifecycleOwner pmvilOwer,String idCardPmvilPositiveImg,String idCardPmvilNegativeImg,PmvilCallBack<PmvilUsrOcr> pmvilOrcCall){
        Map<String, Object> pmvilOcrparams = new HashMap<>();
        pmvilOcrparams.put("rsqjtov", idCardPmvilPositiveImg);//idCardPositiveImg
        pmvilOcrparams.put("cgnvtan", idCardPmvilNegativeImg);//idCardNegativeImg
//        pmvilOcrparams.put("xelttkj", channelPmvilCode);//channelCode
        Observable<PmvilResponseModel<PmvilUsrOcr>> pmvilQuestOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .postUserPmvilOcr(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilOcrparams));
        PmvilHttpCall.doPmvilCall(pmvilOwer, pmvilQuestOble, pmvilOrcCall, null);
    }

    //ocr info queren
    public static void postInfoPmvilOcr(LifecycleOwner pmvilOwer,String userPmvilName,String idPmvilNo,
                                        String pmbisteda,String greanType,PmvilCallBack<Boolean> pmvilOcrInfoCall){
        Map<String, Object> pmvilOcrparams = new HashMap<>();
        pmvilOcrparams.put("uoiyuralq", userPmvilName);//userName
        pmvilOcrparams.put("qjaqc", idPmvilNo);//idNo
        pmvilOcrparams.put("dateOfBirth", pmbisteda);//dateOfBirth
        pmvilOcrparams.put("eyqfivni", greanType);//gender
        Observable<PmvilResponseModel<Boolean>> pmvilQuestOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .postInfoPmvilOcr(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilOcrparams));
        PmvilHttpCall.doPmvilCall(pmvilOwer, pmvilQuestOble, pmvilOcrInfoCall, null);
    }

    //bank list
    public static void getBankPmvilList(LifecycleOwner pmvilOwer,PmvilCallBack<PmvilBanks> pmvilBankCallback){
        Observable<PmvilResponseModel<PmvilBanks>> pmvilQuestOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getBankPmvilList();
        PmvilHttpCall.doPmvilCall(pmvilOwer, pmvilQuestOble, pmvilBankCallback, null);
    }

    //bund bank
    public static void postBankPmvilInfo(LifecycleOwner owner,String usePmName,PmvilBanks.BankListPmvil pmvilBanks,String pmvilTypeaccount,String pmvilBankNum,PmvilCallBack<PmvilBodys> pmvilBankCall){
        Map<String, Object> pmvilOcrparams = new HashMap<>();
        pmvilOcrparams.put("vietzfsk", usePmName);//name
        pmvilOcrparams.put("oxbke", pmvilBanks.getPmvilthirdChannelCode());//thirdChannelCode
        pmvilOcrparams.put("fggyqne", pmvilBanks.getPmvilbankCode());//bankCode
        pmvilOcrparams.put("msztn", pmvilBanks.getPmvilcode());//code
//        pmvilOcrparams.put("deates", pmvilTypeaccount);//accountType
        pmvilOcrparams.put("mxiubap", pmvilBankNum);//accountNumber
        Observable<PmvilResponseModel<PmvilBodys>> pmvilQuestOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .postBankPmvilInfo(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilOcrparams));
        PmvilHttpCall.doPmvilCall(owner, pmvilQuestOble, pmvilBankCall, null);
    }

    //jie kuan que ren
    public static void postApplyPmvilInfo(LifecycleOwner pmvilOwer,List<String> pmvilSellerCode,int pmvilNum,PmvilCallBack<PmvilLanResult> pmvilLoanCall){
        Map<String, Object> pmvilLoanparams = new HashMap<>();
        pmvilLoanparams.put("eacnchei", pmvilSellerCode);//productCodes
        pmvilLoanparams.put("yewacrc",pmvilNum);//pageNum
        Observable<PmvilResponseModel<PmvilLanResult>> pmvilLoanOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .postApplyPmvilInfo(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilLoanparams));
        PmvilHttpCall.doPmvilCall(pmvilOwer, pmvilLoanOble, pmvilLoanCall, null);
    }

    //get order list
    public static void getGoodsPmvilList(LifecycleOwner pmvilOwer,PmvilCallBack<PmvilGoods> pmvilGodsCall){
        Map<String, Object> pmvilLoanparams = new HashMap<>();
        pmvilLoanparams.put("wpeqgrv", "");//applyStatus
        Observable<PmvilResponseModel<PmvilGoods>> pmvilGodsOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getGoodsPmvilList(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilLoanparams));
        PmvilHttpCall.doPmvilCall(pmvilOwer, pmvilGodsOble, pmvilGodsCall, null);
    }

    //get order details
    public static void getStillPmvilInfo(LifecycleOwner pmvilOwer,String pmvilApplyId,PmvilCallBack<PmvilStill> pmvilStillCall){
        Map<String,Object> pmvilStillMap = new HashMap<>();
        pmvilStillMap.put("rhdqgjc",pmvilApplyId);//applyId
        Observable<PmvilResponseModel<PmvilStill>> pmvilStillOble =  PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getStillPmvilInfo(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilStillMap));
        PmvilHttpCall.doPmvilCall(pmvilOwer, pmvilStillOble, pmvilStillCall, null);
    }

    //get left over details
    public static void getLeftOverPmvilInfo(LifecycleOwner pmvilLeftOwer,int pmvilRepayPlanId,PmvilCallBack<PmvilLeftOver> pmvilLeftCall){
        Map<String,Object> pmvilLeftMap = new HashMap<>();
        pmvilLeftMap.put("ghknwq",pmvilRepayPlanId);//repayPlanId
        Observable<PmvilResponseModel<PmvilLeftOver>> pmvilLeftOble =  PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getLeftOverPmvilInfo(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilLeftMap));
        PmvilHttpCall.doPmvilCall(pmvilLeftOwer, pmvilLeftOble, pmvilLeftCall, null);
    }

    //get route
    public static void getRoutePmvilInfo(LifecycleOwner pmvilRoutOwer,int pmvilRepayId,PmvilCallBack<PmvilRoute> pmvilRoutCall){
        Map<String,Object> pmvilRouteMap = new HashMap<>();
        pmvilRouteMap.put("ghknwq",pmvilRepayId);//repayPlanId
        Observable<PmvilResponseModel<PmvilRoute>> pmvilRoutOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getRoutePmvilInfo(PmvilHttpBodyOrStr.getPmvilMethStr(pmvilRouteMap));
        PmvilHttpCall.doPmvilCall(pmvilRoutOwer, pmvilRoutOble, pmvilRoutCall, null);
    }

    //comit still request
    public static void comitStillPmvilInfo(LifecycleOwner pmvilStilOwer,int pmvilRepayid,String pmvilChanel,PmvilCallBack<PmvilStillResult> pmvilStilResulCall){
        Map<String,Object> pmvilStillResltMap = new HashMap<>();
        pmvilStillResltMap.put("ghknwq",pmvilRepayid);//repayPlanId
        pmvilStillResltMap.put("pgyqxt",pmvilChanel);//repayChannel
        Observable<PmvilResponseModel<PmvilStillResult>> pmvilStilResulOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .comitStillPmvilInfo(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilStillResltMap));
        PmvilHttpCall.doPmvilCall(pmvilStilOwer, pmvilStilResulOble, pmvilStilResulCall, null);
    }

    //comit left over still request
    public static void comitLeftOverPmvilInfo(LifecycleOwner pmvilStilOwer,int pmvilRepayid,String pmvilChanel,PmvilCallBack<PmvilStillResult> pmvilStilResulCall){
        Map<String,Object> pmvilLeftStillResltMap = new HashMap<>();
        pmvilLeftStillResltMap.put("ghknwq",pmvilRepayid);//repayPlanId
        pmvilLeftStillResltMap.put("pgyqxt",pmvilChanel);//repayChannel
        Observable<PmvilResponseModel<PmvilStillResult>> pmvilLeftStilResulOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .comitLeftOverPmvilInfo(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilLeftStillResltMap));
        PmvilHttpCall.doPmvilCall(pmvilStilOwer, pmvilLeftStilResulOble, pmvilStilResulCall, null);
    }

    //comit app list info
    public static void comitAppPmvilInfo(LifecycleOwner pmvilAppInfoOwer,PmvilUtilize pmvilAppInfo,PmvilCallBack<Boolean> pmvilAppCall){
        Observable<PmvilResponseModel<Boolean>> pmvilAppInfoOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .comitAppPmvilInfo(PmvilHttpBodyOrStr.getPmvilRequestBy(JSONObject.toJSONString(pmvilAppInfo)));
        PmvilHttpCall.doPmvilCall(pmvilAppInfoOwer, pmvilAppInfoOble, pmvilAppCall, null);
    }

    //comit user data to service
    public static void comitUserPmvilData(String pmvilUserData,PmvilCallBack<Boolean> pmvilUserDataCall){
        Observable<PmvilResponseModel<Boolean>> pmvilUserDataOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .comitUserPmvilData(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilUserData));
        PmvilHttpCall.doPmvilCall(null, pmvilUserDataOble, pmvilUserDataCall, null);
    }

    //comit device info to service
    public static void comitDevicePmvilInfo(String devicePmvilInfoStr,PmvilCallBack<Boolean> pmvilDevicCall){
        Observable<PmvilResponseModel<Boolean>> pmvilDeviceInfoOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .comitDevicePmvilInfo(PmvilHttpBodyOrStr.getPmvilRequestBy(devicePmvilInfoStr));
        PmvilHttpCall.doPmvilCall(null, pmvilDeviceInfoOble, pmvilDevicCall, null);
    }

    //laji interface
    public static void getPmvilLjiswt(LifecycleOwner pmvilOwer,String pmvilLjd,String pmvilILs,PmvilCallBack<String> pmvilStrCall){
        Map<String,Object> pmvilStrMap = new HashMap<>();
        pmvilStrMap.put("pmvilddd",pmvilLjd);
        pmvilStrMap.put("PmvilIls",pmvilILs);
        Observable<PmvilResponseModel<String>> pmvilStrOber = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit().create(PmvilApi.class)
                .getPmvilLjiswt(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilStrMap));
        PmvilHttpCall.doPmvilCall(pmvilOwer,pmvilStrOber,pmvilStrCall,null);
    }

    //laji interface-1
    public static void getPmvilPInset(LifecycleOwner pmvilOwer,String pmvilLjd,String pmvilILs,PmvilCallBack<String> pmvilStrCall){
        Map<String,Object> pmvilBeanMap = new HashMap<>();
        pmvilBeanMap.put("pmvilddd",pmvilLjd);
        pmvilBeanMap.put("PmvilIls",pmvilILs);
        Observable<PmvilResponseModel<String>> pmvilBeanOber = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit().create(PmvilApi.class)
                .getPmvilPInset(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilBeanMap));
        PmvilHttpCall.doPmvilCall(pmvilOwer,pmvilBeanOber,pmvilStrCall,null);
    }

    //laji interface-2
    public static void getPmvilThress(LifecycleOwner pmvilOwer,String pmvilLjd,String pmvilILs,PmvilCallBack<String> pmvilStrCall){
        Map<String,Object> pmvilBeanMap = new HashMap<>();
        pmvilBeanMap.put("pmvilddd",pmvilLjd);
        pmvilBeanMap.put("PmvilIls",pmvilILs);
        pmvilBeanMap.put("PmvilKois",pmvilILs);
        Observable<PmvilResponseModel<String>> pmvilBeanOber = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit().create(PmvilApi.class)
                .getPmvilThress(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilBeanMap));
        PmvilHttpCall.doPmvilCall(pmvilOwer,pmvilBeanOber,pmvilStrCall,null);
    }
    //laji interface-3
    public static void getPmvilPjkwo(LifecycleOwner pmvilOwer,String pmvilLjd,String pmvilILs,PmvilCallBack<String> pmvilStrCall){
        Map<String,Object> pmvilBeanMap = new HashMap<>();
        pmvilBeanMap.put("pmvilddd",pmvilLjd);
        pmvilBeanMap.put("PmvilIls",pmvilILs);
        pmvilBeanMap.put("PmvilIwwels",pmvilILs);
        Observable<PmvilResponseModel<String>> pmvilBeanOber = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit().create(PmvilApi.class)
                .getPmvilPjkwo(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilBeanMap));
        PmvilHttpCall.doPmvilCall(pmvilOwer,pmvilBeanOber,pmvilStrCall,null);
    }

    //laji interface-4
    public static void getPmvilKoslw(LifecycleOwner pmvilOwer,String pmvilLjd,String pmvilILs,PmvilCallBack<String> pmvilStrCall){
        Map<String,Object> pmvilBeanMap = new HashMap<>();
        pmvilBeanMap.put("pmvilddd",pmvilLjd);
        pmvilBeanMap.put("PmvilIls",pmvilILs);
        pmvilBeanMap.put("PmvilIesls",pmvilILs);
        Observable<PmvilResponseModel<String>> pmvilBeanOber = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit().create(PmvilApi.class)
                .getPmvilKoslw(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilBeanMap));
        PmvilHttpCall.doPmvilCall(pmvilOwer,pmvilBeanOber,pmvilStrCall,null);
    }

    //用户认证详情
    public static void getPmvilQueryUser(LifecycleOwner pmvilOwer,PmvilCallBack<PmvilUserRz> pmvilStrCall){
        Observable<PmvilResponseModel<PmvilUserRz>> pmvilBeanOber = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit().create(PmvilApi.class)
                .getPmvilQueryUser();
        PmvilHttpCall.doPmvilCall(pmvilOwer,pmvilBeanOber,pmvilStrCall,null);
    }
 //checkTips
    public static void checkTips(LifecycleOwner pmvilOwer,PmvilCallBack<Boolean> pmvilStrCall){
        Observable<PmvilResponseModel<Boolean>> pmvilBeanOber = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit().create(PmvilApi.class)
                .checkTips();
        PmvilHttpCall.doPmvilCall(pmvilOwer,pmvilBeanOber,pmvilStrCall,null);
    }
//LoanCheck
    public static void LoanCheck(LifecycleOwner pmvilOwer,PmvilCallBack<PmCheckLoan> pmvilStrCall){
        Observable<PmvilResponseModel<PmCheckLoan>> pmvilBeanOber = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit().create(PmvilApi.class)
                .LoanCheck();
        PmvilHttpCall.doPmvilCall(pmvilOwer,pmvilBeanOber,pmvilStrCall,null);
    }


    //借款信息
    public static void getInitLoan(LifecycleOwner pmvilLeftOwer,String versio,int pageNu,PmvilCallBack<PmInitLoan> pmvilLeftCall){
        Map<String,Object> pmvilLeftMap = new HashMap<>();
        pmvilLeftMap.put("qwgoqiwe",versio);//version
        pmvilLeftMap.put("yewacrc",pageNu);//pageNum
        Observable<PmvilResponseModel<PmInitLoan>> pmvilLeftOble =  PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .getInitLoan(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilLeftMap));
        PmvilHttpCall.doPmvilCall(pmvilLeftOwer, pmvilLeftOble, pmvilLeftCall, null);
    }

    //Adjust
    public static void Adjust(LifecycleOwner pmvilLeftOwer,String adId,String trackerName,String gps_adid,PmvilCallBack<Boolean> pmvilLeftCall){
        Map<String,Object> pmvilLeftMap = new HashMap<>();
        pmvilLeftMap.put("ahfaw",adId);//adId
        pmvilLeftMap.put("hjcfqcq",trackerName);//trackerName
        pmvilLeftMap.put("tpkkmpwe",gps_adid);//gps_adid
        Observable<PmvilResponseModel<Boolean>> pmvilLeftOble =  PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .Adjust(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilLeftMap));
        PmvilHttpCall.doPmvilCall(pmvilLeftOwer, pmvilLeftOble, pmvilLeftCall, null);
    }

    //collect
    public static void collect(LifecycleOwner pmvilLeftOwer,int repayPlanId,PmvilCallBack<PmSkZnh> pmvilLeftCall){
        Map<String,Object> pmvilLeftMap = new HashMap<>();
        pmvilLeftMap.put("ghknwq",repayPlanId);//repayPlanId
        Observable<PmvilResponseModel<PmSkZnh>> pmvilLeftOble =  PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .collect(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilLeftMap));
        PmvilHttpCall.doPmvilCall(pmvilLeftOwer, pmvilLeftOble, pmvilLeftCall, null);
    }

    //manual
    public static void manual(LifecycleOwner pmvilLeftOwer,List<String> imgeSt,int reypid,PmvilCallBack<PmSdoxixEtty> pmvilLeftCall){
        Map<String,Object> pmvilLeftMap = new HashMap<>();
        pmvilLeftMap.put("certificates",imgeSt);//certificates
        pmvilLeftMap.put("ghknwq",reypid);//repayPlanId
        Observable<PmvilResponseModel<PmSdoxixEtty>> pmvilLeftOble =  PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .manual(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilLeftMap));
        PmvilHttpCall.doPmvilCall(pmvilLeftOwer, pmvilLeftOble, pmvilLeftCall, null);
    }

    //线下展期还款
    //comit left over still request
    public static void comitLeftOverPmvilInfoses(LifecycleOwner pmvilStilOwer,List<String>imgs,int pmvilRepayid,String pmvilChanel,PmvilCallBack<PmvilStillResult> pmvilStilResulCall) {
        Map<String, Object> pmvilLeftStillResltMap = new HashMap<>();
        pmvilLeftStillResltMap.put("ghknwq", imgs);//certificates
        pmvilLeftStillResltMap.put("ghknwq", pmvilRepayid);//repayPlanId
        pmvilLeftStillResltMap.put("pgyqxt", pmvilChanel);//repayChannel
        Observable<PmvilResponseModel<PmvilStillResult>> pmvilLeftStilResulOble = PmvilRetrofitHelper
                .getPmvilInstance()
                .getPmvilRetrofit()
                .create(PmvilApi.class)
                .comitLeftOverPmvilInfo(PmvilHttpBodyOrStr.getPmvilRequestBy(pmvilLeftStillResltMap));
        PmvilHttpCall.doPmvilCall(pmvilStilOwer, pmvilLeftStilResulOble, pmvilStilResulCall, null);
    }

}
